[HVM] Fix MMIO LODS emulation
authorTim Deegan <Tim.Deegan@xensource.com>
Tue, 20 Feb 2007 20:02:49 +0000 (20:02 +0000)
committerTim Deegan <Tim.Deegan@xensource.com>
Tue, 20 Feb 2007 20:02:49 +0000 (20:02 +0000)
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/hvm/io.c
xen/arch/x86/hvm/platform.c

index 30a80a4f276e66a2cbb1ff00469b470feb41df21..e2e8e35afe9cf728e52f44ac8ad06755729293d8 100644 (file)
@@ -533,6 +533,7 @@ static void hvm_mmio_assist(struct cpu_user_regs *regs, ioreq_t *p,
         break;
 
     case INSTR_LODS:
+        set_reg_value(size, 0, 0, regs, p->data);
         sign = p->df ? -1 : 1;
         regs->esi += sign * p->count * p->size;
         if (mmio_opp->flags & REPZ)
index 268729567caa9166433a3f2d5bac0781a4ea8550..9ba8c3e4a30a675e4dfb27919abb1ef461178da1 100644 (file)
@@ -1136,6 +1136,7 @@ void handle_mmio(unsigned long gpa)
          * Since the source is always in (contiguous) mmio space we don't
          * need to break it up into pages.
          */
+        mmio_op->operand[0] = mk_operand(op_size, 0, 0, REGISTER);
         send_mmio_req(IOREQ_TYPE_COPY, gpa,
                       GET_REPEAT_COUNT(), op_size, 0, IOREQ_READ, df, 0);
         break;